package com.example.quartz;


import org.quartz.JobExecutionContext;
import org.springframework.scheduling.quartz.QuartzJobBean;

/**
 * @Description : 定义任务类
 * @Author : Bruce Lee
 * @CreateTime : 2024/2/6
 */

public class HelloJob extends QuartzJobBean {

    @Override
    protected void executeInternal(JobExecutionContext context) {
        String name = (String) context.getJobDetail().getJobDataMap().get("name");
        System.out.println("Hello " + name);
    }
}
